<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
<html xmlns="http://www.w3.org/1999/xhtml"  
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:f="http://java.sun.com/jsf/core">  
    <body>  
        <ui:composition template="./structure.xhtml">  
            <ui:define name="content">  
                <h:form prependId="false" rendered="#{!utilisateursMBean.isOnline()}">  
                    <script>document.location="./index.xhtml";</script>
                </h:form>
                <h:form prependId="false"  rendered="#{utilisateursMBean.isOnline()}">  
                    <h:panelGrid id="grid" columns="3">  
                        <h:outputText value="Compte débiteur" />  
                        <p:selectOneMenu id="comptes" required="true" value="#{comptesMBean.idCompteDebiteur}">  
                            <f:selectItem itemLabel="Select One" itemValue="" />  
                            <f:selectItems value="#{utilisateursMBean.current.comptes}" var="compte" itemLabel="#{compte.titre}" itemValue="#{compte.id}"/>  
                        </p:selectOneMenu>
                        <p:message for="comptes" display="text"/>  
                        
                        
                        <h:outputText value="Montant" />  
                        <p:spinner id="montant" value="#{comptesMBean.montant}" />  
                        <p:message for="montant" display="text"/>  
                        
                        <p:commandButton value="Effectuer" type="submit" action="#{comptesMBean.retrait}"/>  
                        
                    </h:panelGrid>  
                </h:form>
            </ui:define>  
        </ui:composition>  
    </body>  
</html>  